/*
 * @FilePath: index.js
 * @Author: 杜芬
 * @Date: 2024-06-07 15:26:25
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-06-12 17:44:05
 * Copyright: 2024 xxxTech CO.,LTD. All Rights Reserved.
 * @Descripttion: 页面
 */
import { createRouter, createWebHistory } from 'vue-router'
import Login from "@/views/Login/index.vue"
import Layout from "@/views/Layout/index.vue"
import Home from "@/views/Home/index.vue"
import Category from "@/views/Category/index.vue"

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component : Layout,
      children:[
        {
          path: '',
          component : Home,
        },
        {
          path: '/category',
          component : Category,
        }
      ]
      // component: () => ('@/views/Layout/index.vue')
    },
    {
      path: '/login',
      name: 'Login',
      component :Login
    }
  ]
})

export default router
